Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/UnreadUiDefaults.kt bc5cf83df7fd6b405ffc521d7c3ed4e1f3e8271a (bc5cf83d) Text, 2.05 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.messaging

T8b949e/**
* Shared configuration for how unread markers behave in the message thread.
*
* Keeping these in one place makes it easier to reason about how the unread divider and auto-mark-as-read flows work
* across `Message` and `MessageList`.
*/
Tff7b72internal Tff7b72object T56d364UnreadUiDefaults Tb4b4b4{
T8b949e/**
* The number of most-recent messages we attempt to keep visible when jumping to unread content.
*
* With the list reversed (newest at index 0) this translates to showing up to this many messages *above* the unread
* divider so the user can read into the conversation with enough context.
*/
Tff7b72const Tff7b72val Te6edf3VISIBLE_CONTEXT_COUNT Tff7b72= T79c0ff5

T8b949e/**
* Acceptable pixel offset from the absolute bottom of the list while still treating the user as "caught up".
* Compose list positioning can drift by a few pixels during fling settles, so this tolerance keeps the auto-scroll
* behavior feeling buttery when new packets arrive.
*/
Tff7b72const Tff7b72val Te6edf3AUTO_SCROLL_BOTTOM_OFFSET_TOLERANCE Tff7b72= T79c0ff8

T8b949e/**
* Delay (in milliseconds) before we persist a new "last read" marker while scrolling.
*
* A longer debounce prevents thrashing the database during quick scrubs yet still feels responsive once the user
* settles on a position.
*/
Tff7b72const Tff7b72val Te6edf3SCROLL_DEBOUNCE_MILLIS Tff7b72= T79c0ff5T79c0ff0T79c0ff0L
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s